package edu.nf.api.controller.rider;

import edu.nf.api.controller.BaseController;
import edu.nf.meituan.service.rider.impl.RiderServiceImpl;
import org.nf.web.annotation.RequestMapping;
import org.nf.web.annotation.RequestParam;
import org.nf.web.servlet.View;
import org.nf.web.servlet.view.JsonView;


/**
 * @Date 2023-06-21
 * @Author qiu
 * 骑手注册
 */
public class RegisterRiderController extends BaseController {

    /**
     * 骑手注册
     *
     * @param riderName  骑手姓名
     * @param riderPhone 骑手电话
     * @param riderType  类型
     * @param key        验证码
     * @return
     */
    @RequestMapping("/rider/register")
    public View registerRider(@RequestParam("riderName") String riderName,
                              @RequestParam("riderPhone") String riderPhone,
                              @RequestParam("riderType") String riderType,
                              @RequestParam("key") String key) {
        int row = new RiderServiceImpl().registerRider(riderName, riderPhone, riderType, key);

        return new JsonView(row);
    }

}
